﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;
using System.Data.SqlClient;

namespace BLL
{
    /// <summary>
    /// 人员表
    /// </summary>
    public class UsersBll
    {
        UsersDal dal = new UsersDal();
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="UsersName"></param>
        /// <param name="UsersPwd"></param>
        /// <returns></returns>
        public List<SysUser> UsersLogin(string UsersName, string UsersPwd)
        {
            return dal.UsersLogin(UsersName, UsersPwd);
        }

          /// <summary>
        /// 显示
        /// </summary>
        /// <returns>List集合</returns>
        public List<SysUser> Show(params SqlParameter[] paramters)
        {
            return dal.Show(paramters);
        }
         /// <summary>
       ///  根据部门编号查询改部门编号下的勘察员
       /// </summary>
       /// <param name="value"></param>
       /// <returns></returns>
        public List<SysUser> GetUsers(int newValue,int role)
        {
            return dal.GetUsers(newValue,role);
        }
        /// <summary>
        /// 修改用户状态
        /// </summary>
        /// <param name="Users_Name">用户名</param>
        /// <param name="Users_IsState">状态编号</param>
        /// <returns></returns>
        public bool updateState(string Users_Name, int Users_IsState)
        {
            return dal.updateState(Users_Name, Users_IsState);
        }
        public bool AddUser(SysUser user)
        {
            return dal.AddUser(user);
        }
    }
}
